﻿
using SHKF.B2C.Model.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text; 

namespace SHKF.B2C.YouZanYun.Model.Entity.Order
{
    /// <summary>
    /// 有赞云订单
    /// 2022-4-5
    /// 王鹏
    /// </summary>
    [SugarTable( "Trade_Content")]
    public class TradeContentEntity : BaseEntity
    {
        /// <summary>
        /// <summary>
        /// 业务消息的标识
        /// </summary>
        public string id { get; set; }

        /// <summary>
        /// 门店ID
        /// </summary>
        public long kdt_id { get; set; }

        /// <summary>
        /// 店铺名称
        /// </summary>
        public string kdt_name { get; set; }
 
        /// <summary>
        /// 消息唯一标示
        /// </summary>
        public string msg_id { get; set; }

        /// <summary>
        /// 连锁门店总店ID
        /// </summary>
        public string root_kdt_id { get; set; }

        /// <summary>
        /// 重发的次数
        /// </summary>
        public int sendCount { get; set; }

        /// <summary>
        /// 交易状态
        /// </summary>
        public string status { get; set; }

        //------------------------------------------订单收货地址信息结构 
        public float longitude { get; set; }
        public float latitude { get; set; }
        public string areaCode { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string delivery_address { get; set; }

        /// <summary>
        /// 市
        /// </summary>
        public string delivery_city { get; set; }

        /// <summary>
        /// 区
        /// </summary>
        public string delivery_district { get; set; }
         
        /// <summary>
        /// 同城送预计送达时间-结束时间 非同城送以及没有开启定时达的订单不返回
        /// </summary>
        public DateTime delivery_end_time { get; set; }

        /// <summary>
        /// 邮政编码
        /// </summary>
        public string delivery_postal_code { get; set; }

        /// <summary>
        /// 省
        /// </summary>
        public string delivery_province { get; set; }

        /// <summary>
        /// 同城送预计送达时间-开始时间 非同城送以及没有开启定时达的订单不返回
        /// </summary>
        public DateTime delivery_start_time { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string receiver_name { get; set; }

        /// <summary>
        /// 收货人手机号
        /// </summary>
        public string receiver_tel { get; set; }

        //------------------------------------------买家信息结构体

        /// <summary>
        /// 有赞用户id，用户在有赞的唯一id。推荐使用
        /// </summary>
        public string yz_open_id { get; set; }

        /// <summary>
        /// 买家手机号
        /// </summary>
        public string buyer_phone { get; set; }

        /// <summary>
        /// 微信H5和微信小程序,的订单会返回open_user_id
        /// </summary>
        public string outer_user_id { get; set; }


        //------------------------------------------交易明细详情
        /// <summary>
        /// 订单创建时间
        /// </summary>
        public DateTime created { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime update_time { get; set; }

        /// <summary>
        /// 订单支付时间
        /// </summary>
        public DateTime pay_time { get; set; }

        /// <summary>
        /// 支付类型
        /// </summary>
        public int pay_type { get; set; }

        /// <summary>
        /// 退款状态 0:未退款; 1:部分退款中; 2:部分退款成功; 11:全额退款中; 12:全额退款成功
        /// </summary>
        public int refund_state { get; set; }

        /// <summary>
        /// 主订单类型
        /// </summary>
        public int type { get; set; }

        //------------------------------------------支付信息
        /// <summary>
        /// 优惠前商品总价
        /// </summary>
        public decimal total_fee { get; set; }

        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal payment { get; set; }

        /// <summary>
        /// 邮费
        /// </summary>
        public decimal post_fee { get; set; }

        /// <summary>
        /// 优惠总金额
        /// </summary>
        public decimal discount_fee { get; set; }
         
        //------------------------------------------备注
        /// <summary>
        /// 订单买家留言
        /// </summary>
        public string buyer_message { get; set; }

        /// <summary>
        /// 订单标星等级 0-5
        /// </summary>
        public int star { get; set; }

        /// <summary>
        /// 订单商家备注
        /// </summary>
        public string trade_memo { get; set; }
         
        public DateTime pDate { get; set; }
    }
}
